--[[
    * Author:Dzlua
    * QQ:505544956
    * Time:2017/03/09
--]]
set_project("SurperDuilib")
set_version("1.0.0")
--set_warnings("all", "error")
set_languages("c99", "cxx11")

if is_mode("release") then
    set_symbols("hidden")
    set_optimize("fastest")
    set_strip("all")
    add_defines("NDEBUG")
    --add_cxflags("-O1","-Ob1","-GF")
elseif is_mode("debug") then
    set_symbols("debug")
    set_optimize("none")
    add_defines("DEBUG","_DEBUG")
    --add_cxflags("-Od","-Gm","-RTC1","-ZI")
end

add_defines("WIN32","_WINDOWS")
add_links("kernel32","user32","gdi32","winspool","comdlg32","advapi32","shell32","ole32","oleaut32","uuid","odbc32","odbccp32")
--add_cxflags("-Gs","-EHsc","-Gd","-Gy")

add_includedirs("src","src/duilib","src/spdui")
add_files("src/duilib/**.cpp","src/spdui/**.cpp")

set_headerdir("out/inc/spdui")
add_headers("src/duilib/(**.h)|StdAfx.h","src/duilib/(**.tlh)","src/spdui/(**.h)")

if is_mode("debug") then
    target("spdui_d")
        set_kind("shared")
        add_defines("UILIB_EXPORTS","_WINDLL")
        add_cxflags("-MDd")
        add_defines("_UNICODE","UNICODE")
    target("spdui_ad")
        set_kind("shared")
        add_defines("UILIB_EXPORTS","_WINDLL")
        add_cxflags("-MDd")
    target("spdui_sd")
        set_kind("static")
        add_defines("UILIB_STATIC")
        add_defines("_UNICODE","UNICODE")
        add_cxflags("-MTd")
    target("spdui_asd")
        set_kind("static")
        add_defines("UILIB_STATIC")
        add_cxflags("-MTd")
elseif is_mode("release") then
    target("spdui")
        set_kind("shared")
        add_defines("UILIB_EXPORTS","_WINDLL")
        add_cxflags("-MD")
        add_defines("_UNICODE","UNICODE")
    target("spdui_a")
        set_kind("shared")
        add_defines("UILIB_EXPORTS","_WINDLL")
        add_cxflags("-MD")
    target("spdui_s")
        set_kind("static")
        add_defines("UILIB_STATIC")
        add_defines("_UNICODE","UNICODE")
        add_cxflags("-MT")
    target("spdui_as")
        set_kind("static")
        add_defines("UILIB_STATIC")
        add_cxflags("-MT")
end
